//
//  DataPartView.h
//  lvtu
//
//  Created by Apple on 12-3-29.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum element_type 
{
    TYPE_EAT = 1,          //! 吃
    TYPE_LIVE = 2,             //! 住
    TYPE_TRAVEL = 4,           //! 游
    TYPE_BUY = 5,              //! 购
    TYPE_PLAY = 6,             //! 娱
    
    TYPE_OTHER = 100
}ElementType;


typedef enum _button_style 
{
    ADDBUTTON = 0,
    EDITBUTTON,
    BOTHBUTTON,
    NONEBUTTON
}BUTTON_STYLE;

@protocol DataPartViewProtocol <NSObject>

//图片点击处理代理方法
- (void)touchUpInsideEditViewCell:(NSString*)indexText button:(NSInteger)buttontype elementType:(ElementType)type;

@end

@interface DataPartView : UIView
{
    UIImageView* inputView;
    UILabel* partLabel;
    UILabel* eventCountLabel;
    
    UIButton* addButton;
    UIButton* editButton;
    id<DataPartViewProtocol> delegate;
    
    ElementType elementType;
    NSMutableArray* eventArray;
    UIScrollView* eventScorllView;
    UIImageView* lineView;
}

@property (nonatomic, retain)UILabel* partLabel;
@property (nonatomic, retain)UILabel* eventCountLabel;
@property (nonatomic, retain)UIButton* addButton;
@property (nonatomic, retain)UIButton* editButton;
@property (nonatomic, assign)id<DataPartViewProtocol> delegate;
@property (nonatomic, assign)ElementType elementType;
@property (nonatomic, assign)NSMutableArray* eventArray;

- (void)setEventCount:(NSInteger) count;
- (void)setEventCountForEdit:(NSInteger) count;
- (void)setButtonStyle:(BUTTON_STYLE) style;
- (BOOL)setEventShow:(NSMutableArray*) array;
@end
